<script lang="ts" setup>
import xgTable from '../../components/Table.vue'


const tableData = [
  {
    name: '红番区',
    star: '成龙',
    date: '2008',
    rate: '7.8',
    type: '动作'
  },
  {
    name: '醉拳',
    star: '成龙',
    date: '2002',
    rate: '7.8',
    type: '动作'
  },
  {
    name: '少林寺',
    star: '李连杰',
    date: '2005',
    rate: '8.0',
    type: '动作'
  },
  {
    name: '少林小子',
    star: '李连杰',
    date: '2006',
    rate: '7.6',
    type: '动作'
  }
]
const tableCols = [
  {
    title: '片名',
    key: 'name'
  },
  {
    title: '主演',
    key: 'star'
  },
  {
    title: '上映年份',
    key: 'date'
  },
  {
    title: '评分',
    key: 'rate'
  },
  {
    title: '类型',
    key: 'type'
  }
]
</script>

<template>
  <div>
    <xgTable :data="tableData" :cols="tableCols" rowKey="name" ></xgTable>
  </div>
</template>